//
//  BaseController.swift
//  
//
//  Created by S JZ on 2024/9/5.
//

#if os(iOS)
import UIKit

open class BaseController: UIViewController {
    
    public var statusBarHidden: Bool = false {
        didSet { setNeedsStatusBarAppearanceUpdate() }
    }
    public var statusBarType: UIStatusBarStyle = .default {
        didSet { setNeedsStatusBarAppearanceUpdate() }
    }
    
    open override var prefersStatusBarHidden: Bool {  statusBarHidden }
    open override var preferredStatusBarStyle: UIStatusBarStyle { statusBarType }
    
    open override func viewDidLoad() {
        super.viewDidLoad()
    }
    
    open override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        setNeedsStatusBarAppearanceUpdate()
    }
}
#endif
